home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17961 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  942 b 

  1. Path: newshost.uwo.ca!usenet
  2. From: Sharon Wang <swang1@julian.uwo.ca>
  3. Newsgroups: comp.lang.c++
  4. Subject: Variable ARG list (of type double)?
  5. Date: 18 Apr 1996 01:16:18 GMT
  6. Organization: UWO, London, Canada
  7. Message-ID: <4l4552$al2@falcon.ccs.uwo.ca>
  8. NNTP-Posting-Host: ts1-65.slip.uwo.ca
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Authenticated: swang1@ts1-65.slip.uwo.ca
  13. X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
  14.  
  15. I'd like to make a vector with given elements, e.g.
  16.  
  17.     vector u(1,2,3), u(1,2,3,4,5);
  18.  
  19. so I was trying to use va_start() and va_arg() in <stdarg.h>.
  20. However, the manpage for stdarg.h and several C, C++ bibles give
  21. only the examples in which, the argument list starts with
  22. char *string, e.g. printf(const char *fmt, ...).  Anybody know
  23. how to get (double arg, ...) work? (basically, how to terminate
  24. the search for the last arg in the list)
  25.  
  26. Sharon
  27. <swang1@julian.uwo.ca>
  28.  
  29.  
  30.